.class public Lcom/ninesky/browser/provider/downloads/DownloadService;
.super Landroid/app/Service;


# instance fields
.field a:Lcom/ninesky/browser/provider/downloads/o;

.field b:Lcom/ninesky/browser/provider/downloads/l;

.field private c:Lcom/ninesky/browser/provider/downloads/f;

.field private d:Lcom/ninesky/browser/provider/downloads/i;

.field private e:Ljava/util/ArrayList;

.field private f:Z

.field private g:Lcom/ninesky/browser/provider/downloads/a;

.field private h:Z

.field private i:Landroid/media/IMediaScannerService;

.field private j:Landroid/database/CharArrayBuffer;

.field private k:Landroid/database/CharArrayBuffer;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Landroid/app/Service;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;IJ)J
    .locals 5

    const-wide/16 v3, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/ninesky/browser/provider/downloads/s;

    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v0}, Lcom/ninesky/browser/provider/downloads/w;->c(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const-wide/16 v0, -0x1

    :goto_0
    return-wide v0

    :cond_0
    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v1, 0xc1

    if-eq v0, v1, :cond_1

    move-wide v0, v3

    goto :goto_0

    :cond_1
    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->k:I

    if-nez v0, :cond_2

    move-wide v0, v3

    goto :goto_0

    :cond_2
    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/s;->b()J

    move-result-wide v0

    cmp-long v2, v0, p2

    if-gtz v2, :cond_3

    move-wide v0, v3

    goto :goto_0

    :cond_3
    sub-long/2addr v0, p2

    goto :goto_0
.end method

.method private a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;
    .locals 7

    const/4 v6, 0x0

    invoke-interface {p2, p3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v0

    if-nez p1, :cond_0

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    if-nez v1, :cond_1

    new-instance v1, Landroid/database/CharArrayBuffer;

    const/16 v2, 0x80

    invoke-direct {v1, v2}, Landroid/database/CharArrayBuffer;-><init>(I)V

    iput-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    :cond_1
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    invoke-interface {p2, v0, v1}, Landroid/database/Cursor;->copyStringToBuffer(ILandroid/database/CharArrayBuffer;)V

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    iget v1, v1, Landroid/database/CharArrayBuffer;->sizeCopied:I

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    if-eq v1, v2, :cond_2

    invoke-interface {p2, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->j:Landroid/database/CharArrayBuffer;

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->j:Landroid/database/CharArrayBuffer;

    iget v0, v0, Landroid/database/CharArrayBuffer;->sizeCopied:I

    if-ge v0, v1, :cond_4

    :cond_3
    new-instance v0, Landroid/database/CharArrayBuffer;

    invoke-direct {v0, v1}, Landroid/database/CharArrayBuffer;-><init>(I)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->j:Landroid/database/CharArrayBuffer;

    :cond_4
    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->j:Landroid/database/CharArrayBuffer;

    iget-object v0, v0, Landroid/database/CharArrayBuffer;->data:[C

    iget-object v2, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    iget-object v2, v2, Landroid/database/CharArrayBuffer;->data:[C

    invoke-virtual {p1, v6, v1, v0, v6}, Ljava/lang/String;->getChars(II[CI)V

    const/4 v3, 0x1

    sub-int v3, v1, v3

    :goto_1
    if-gez v3, :cond_5

    move-object v0, p1

    goto :goto_0

    :cond_5
    aget-char v4, v0, v3

    aget-char v5, v2, v3

    if-eq v4, v5, :cond_6

    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, v2, v6, v1}, Ljava/lang/String;-><init>([CII)V

    goto :goto_0

    :cond_6
    add-int/lit8 v3, v3, -0x1

    goto :goto_1
.end method

.method private a()V
    .locals 2

    monitor-enter p0

    const/4 v0, 0x1

    :try_start_0
    iput-boolean v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->f:Z

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->a:Lcom/ninesky/browser/provider/downloads/o;

    if-nez v0, :cond_0

    new-instance v0, Lcom/ninesky/browser/provider/downloads/o;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/provider/downloads/o;-><init>(Lcom/ninesky/browser/provider/downloads/DownloadService;)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->a:Lcom/ninesky/browser/provider/downloads/o;

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->a:Lcom/ninesky/browser/provider/downloads/o;

    invoke-interface {v0, v1}, Lcom/ninesky/browser/provider/downloads/l;->a(Ljava/lang/Thread;)V

    :cond_0
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;)V
    .locals 0

    invoke-direct {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a()V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/database/Cursor;IJ)V
    .locals 7

    const/16 v6, 0x196

    const/4 v5, 0x0

    const/4 v4, 0x1

    new-instance v0, Lcom/ninesky/browser/provider/downloads/s;

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    invoke-direct {v0, p0, v1, p1}, Lcom/ninesky/browser/provider/downloads/s;-><init>(Landroid/content/Context;Lcom/ninesky/browser/provider/downloads/l;Landroid/database/Cursor;)V

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v1, p2, v0}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    if-nez v1, :cond_2

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    if-eqz v1, :cond_0

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    const/4 v2, 0x2

    if-ne v1, v2, :cond_2

    :cond_0
    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    if-eqz v1, :cond_2

    const-string v1, "application/vnd.oma.drm.message"

    iget-object v2, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "file"

    const-string v3, ""

    invoke-static {v2, v3, v5}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    iget-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    const/high16 v3, 0x1

    invoke-virtual {v2, v1, v3}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v1

    if-nez v1, :cond_2

    iput v6, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    sget-object v1, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    iget v2, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    int-to-long v2, v2

    invoke-static {v1, v2, v3}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v1

    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    const-string v3, "status"

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    invoke-virtual {v3, v1, v2, v5, v5}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/provider/downloads/s;->a(Landroid/net/Uri;)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->i:I

    if-eq v1, v4, :cond_7

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    if-nez v1, :cond_3

    move v1, v4

    :goto_1
    if-eqz v1, :cond_1

    invoke-virtual {v0}, Lcom/ninesky/browser/provider/downloads/s;->d()V

    goto :goto_0

    :cond_3
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xbe

    if-ne v1, v2, :cond_4

    move v1, v4

    goto :goto_1

    :cond_4
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xc0

    if-ne v1, v2, :cond_5

    move v1, v4

    goto :goto_1

    :cond_5
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xc1

    if-ne v1, v2, :cond_7

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->k:I

    if-nez v1, :cond_6

    move v1, v4

    goto :goto_1

    :cond_6
    invoke-virtual {v0}, Lcom/ninesky/browser/provider/downloads/s;->b()J

    move-result-wide v1

    cmp-long v1, v1, p3

    if-gez v1, :cond_7

    move v1, v4

    goto :goto_1

    :cond_7
    const/4 v1, 0x0

    goto :goto_1
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/media/IMediaScannerService;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->h:Z

    return-void
.end method

.method private a(Landroid/database/Cursor;I)Z
    .locals 6

    const/4 v5, 0x1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/provider/downloads/s;

    monitor-enter p0

    :try_start_0
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v1, :cond_1

    :try_start_1
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;

    iget-object v2, v0, Lcom/ninesky/browser/provider/downloads/s;->e:Ljava/lang/String;

    iget-object v0, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    invoke-interface {v1, v2, v0}, Landroid/media/IMediaScannerService;->scanFile(Ljava/lang/String;Ljava/lang/String;)V

    if-eqz p1, :cond_0

    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    const-string v1, "scanned"

    const/4 v2, 0x1

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    sget-object v2, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    const-string v3, "_id"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v3

    invoke-static {v2, v3, v4}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v2

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v1, v2, v0, v3, v4}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0

    :cond_0
    :try_start_2
    monitor-exit p0

    move v0, v5

    :goto_0
    return v0

    :catch_0
    move-exception v0

    :cond_1
    monitor-exit p0

    const/4 v0, 0x0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;I)Z
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/ninesky/browser/provider/downloads/s;

    iget-boolean v0, p0, Lcom/ninesky/browser/provider/downloads/s;->w:Z

    if-nez v0, :cond_0

    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    if-nez v0, :cond_0

    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v0}, Lcom/ninesky/browser/provider/downloads/w;->a(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "application/vnd.oma.drm.message"

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic a(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/database/Cursor;I)Z
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Landroid/database/Cursor;I)Z

    move-result v0

    return v0
.end method

.method static synthetic b(Lcom/ninesky/browser/provider/downloads/DownloadService;)Landroid/media/IMediaScannerService;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;

    return-object v0
.end method

.method static synthetic b(Lcom/ninesky/browser/provider/downloads/DownloadService;I)V
    .locals 3

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/provider/downloads/s;

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xc0

    if-ne v1, v2, :cond_1

    const/16 v1, 0x1ea

    iput v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    :cond_0
    :goto_0
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    iget v0, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    invoke-interface {v1, v0}, Lcom/ninesky/browser/provider/downloads/l;->a(I)V

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;

    return-void

    :cond_1
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    if-eqz v1, :cond_0

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->e:Ljava/lang/String;

    if-eqz v1, :cond_0

    new-instance v1, Ljava/io/File;

    iget-object v2, v0, Lcom/ninesky/browser/provider/downloads/s;->e:Ljava/lang/String;

    invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    goto :goto_0
.end method

.method static synthetic b(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/database/Cursor;IJ)V
    .locals 8

    const/4 v7, 0x0

    const/4 v6, 0x1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/provider/downloads/s;

    const-string v1, "status"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    const-string v2, "numfailed"

    invoke-interface {p1, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v2

    const-string v3, "_id"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    iput v3, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    iget-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->b:Ljava/lang/String;

    const-string v4, "uri"

    invoke-direct {p0, v3, p1, v4}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->b:Ljava/lang/String;

    const-string v3, "no_integrity"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    if-ne v3, v6, :cond_3

    move v3, v6

    :goto_0
    iput-boolean v3, v0, Lcom/ninesky/browser/provider/downloads/s;->c:Z

    iget-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->d:Ljava/lang/String;

    const-string v4, "hint"

    invoke-direct {p0, v3, p1, v4}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->d:Ljava/lang/String;

    iget-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->e:Ljava/lang/String;

    const-string v4, "_data"

    invoke-direct {p0, v3, p1, v4}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->e:Ljava/lang/String;

    iget-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    const-string v4, "mimetype"

    invoke-direct {p0, v3, p1, v4}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->f:Ljava/lang/String;

    const-string v3, "title"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v3

    iput-object v3, v0, Lcom/ninesky/browser/provider/downloads/s;->y:Ljava/lang/String;

    const-string v3, "destination"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    iput v3, v0, Lcom/ninesky/browser/provider/downloads/s;->g:I

    const-string v3, "visibility"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    iget v4, v0, Lcom/ninesky/browser/provider/downloads/s;->h:I

    if-ne v4, v6, :cond_0

    if-eq v3, v6, :cond_0

    iget v4, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v4}, Lcom/ninesky/browser/provider/downloads/w;->c(I)Z

    move-result v4

    if-eqz v4, :cond_0

    iget-object v4, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    iget v5, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    invoke-interface {v4, v5}, Lcom/ninesky/browser/provider/downloads/l;->a(I)V

    :cond_0
    iput v3, v0, Lcom/ninesky/browser/provider/downloads/s;->h:I

    monitor-enter v0

    :try_start_0
    const-string v3, "control"

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v3

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    iput v3, v0, Lcom/ninesky/browser/provider/downloads/s;->i:I

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    iget v3, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v3}, Lcom/ninesky/browser/provider/downloads/w;->c(I)Z

    move-result v3

    if-nez v3, :cond_1

    invoke-static {v1}, Lcom/ninesky/browser/provider/downloads/w;->c(I)Z

    move-result v3

    if-eqz v3, :cond_1

    iget-object v3, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    iget v4, v0, Lcom/ninesky/browser/provider/downloads/s;->a:I

    invoke-interface {v3, v4}, Lcom/ninesky/browser/provider/downloads/l;->a(I)V

    :cond_1
    iput v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-interface {p1, v2}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    iput v1, v0, Lcom/ninesky/browser/provider/downloads/s;->k:I

    const-string v1, "method"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    const v2, 0xfffffff

    and-int/2addr v2, v1

    iput v2, v0, Lcom/ninesky/browser/provider/downloads/s;->l:I

    shr-int/lit8 v1, v1, 0x1c

    iput v1, v0, Lcom/ninesky/browser/provider/downloads/s;->m:I

    const-string v1, "lastmod"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v1

    iput-wide v1, v0, Lcom/ninesky/browser/provider/downloads/s;->n:J

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->o:Ljava/lang/String;

    const-string v2, "notificationpackage"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->o:Ljava/lang/String;

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->p:Ljava/lang/String;

    const-string v2, "notificationclass"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->p:Ljava/lang/String;

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->q:Ljava/lang/String;

    const-string v2, "cookiedata"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->q:Ljava/lang/String;

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->r:Ljava/lang/String;

    const-string v2, "useragent"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->r:Ljava/lang/String;

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->s:Ljava/lang/String;

    const-string v2, "referer"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->s:Ljava/lang/String;

    const-string v1, "total_bytes"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    int-to-long v1, v1

    iput-wide v1, v0, Lcom/ninesky/browser/provider/downloads/s;->t:J

    const-string v1, "current_bytes"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    int-to-long v1, v1

    iput-wide v1, v0, Lcom/ninesky/browser/provider/downloads/s;->u:J

    iget-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->v:Ljava/lang/String;

    const-string v2, "etag"

    invoke-direct {p0, v1, p1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Ljava/lang/String;Landroid/database/Cursor;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/ninesky/browser/provider/downloads/s;->v:Ljava/lang/String;

    const-string v1, "scanned"

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    invoke-interface {p1, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    if-ne v1, v6, :cond_4

    move v1, v6

    :goto_1
    iput-boolean v1, v0, Lcom/ninesky/browser/provider/downloads/s;->w:Z

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->i:I

    if-eq v1, v6, :cond_8

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    if-nez v1, :cond_5

    move v1, v6

    :goto_2
    if-eqz v1, :cond_2

    invoke-virtual {v0}, Lcom/ninesky/browser/provider/downloads/s;->d()V

    :cond_2
    return-void

    :cond_3
    move v3, v7

    goto/16 :goto_0

    :catchall_0
    move-exception v1

    :try_start_1
    monitor-exit v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v1

    :cond_4
    move v1, v7

    goto :goto_1

    :cond_5
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xbe

    if-ne v1, v2, :cond_6

    move v1, v6

    goto :goto_2

    :cond_6
    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    const/16 v2, 0xc1

    if-ne v1, v2, :cond_8

    iget v1, v0, Lcom/ninesky/browser/provider/downloads/s;->k:I

    if-nez v1, :cond_7

    invoke-virtual {v0}, Lcom/ninesky/browser/provider/downloads/s;->c()Z

    move-result v1

    goto :goto_2

    :cond_7
    invoke-virtual {v0}, Lcom/ninesky/browser/provider/downloads/s;->b()J

    move-result-wide v1

    cmp-long v1, v1, p3

    if-gez v1, :cond_8

    move v1, v6

    goto :goto_2

    :cond_8
    move v1, v7

    goto :goto_2
.end method

.method static synthetic c(Lcom/ninesky/browser/provider/downloads/DownloadService;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->f:Z

    return v0
.end method

.method static synthetic c(Lcom/ninesky/browser/provider/downloads/DownloadService;I)Z
    .locals 2

    const/4 v1, 0x1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/ninesky/browser/provider/downloads/s;

    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->j:I

    invoke-static {v0}, Lcom/ninesky/browser/provider/downloads/w;->c(I)Z

    move-result v0

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/ninesky/browser/provider/downloads/s;->h:I

    if-ne v0, v1, :cond_0

    move v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic d(Lcom/ninesky/browser/provider/downloads/DownloadService;)V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->j:Landroid/database/CharArrayBuffer;

    return-void
.end method

.method static synthetic e(Lcom/ninesky/browser/provider/downloads/DownloadService;)V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->k:Landroid/database/CharArrayBuffer;

    return-void
.end method

.method static synthetic f(Lcom/ninesky/browser/provider/downloads/DownloadService;)V
    .locals 1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->f:Z

    return-void
.end method

.method static synthetic g(Lcom/ninesky/browser/provider/downloads/DownloadService;)Ljava/util/ArrayList;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic h(Lcom/ninesky/browser/provider/downloads/DownloadService;)Z
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method static synthetic i(Lcom/ninesky/browser/provider/downloads/DownloadService;)Lcom/ninesky/browser/provider/downloads/i;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->d:Lcom/ninesky/browser/provider/downloads/i;

    return-object v0
.end method

.method static synthetic j(Lcom/ninesky/browser/provider/downloads/DownloadService;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->h:Z

    return v0
.end method

.method static synthetic k(Lcom/ninesky/browser/provider/downloads/DownloadService;)Lcom/ninesky/browser/provider/downloads/a;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->g:Lcom/ninesky/browser/provider/downloads/a;

    return-object v0
.end method


# virtual methods
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder;
    .locals 2

    new-instance v0, Ljava/lang/UnsupportedOperationException;

    const-string v1, "Cannot bind to Download Manager Service"

    invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public onCreate()V
    .locals 10

    const/4 v9, 0x1

    const/4 v8, 0x0

    const/4 v4, 0x0

    invoke-super {p0}, Landroid/app/Service;->onCreate()V

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    if-nez v0, :cond_0

    new-instance v0, Lcom/ninesky/browser/provider/downloads/j;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/provider/downloads/j;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    :cond_0
    invoke-static {}, Lcom/google/android/collect/Lists;->newArrayList()Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    new-instance v0, Lcom/ninesky/browser/provider/downloads/f;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/provider/downloads/f;-><init>(Lcom/ninesky/browser/provider/downloads/DownloadService;)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->c:Lcom/ninesky/browser/provider/downloads/f;

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    sget-object v1, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    iget-object v2, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->c:Lcom/ninesky/browser/provider/downloads/f;

    invoke-virtual {v0, v1, v9, v2}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

    iput-object v4, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->i:Landroid/media/IMediaScannerService;

    iput-boolean v8, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->h:Z

    new-instance v0, Lcom/ninesky/browser/provider/downloads/a;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/provider/downloads/a;-><init>(Lcom/ninesky/browser/provider/downloads/DownloadService;)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->g:Lcom/ninesky/browser/provider/downloads/a;

    new-instance v0, Lcom/ninesky/browser/provider/downloads/i;

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    invoke-direct {v0, p0, v1}, Lcom/ninesky/browser/provider/downloads/i;-><init>(Landroid/content/Context;Lcom/ninesky/browser/provider/downloads/l;)V

    iput-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->d:Lcom/ninesky/browser/provider/downloads/i;

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->b:Lcom/ninesky/browser/provider/downloads/l;

    invoke-interface {v0}, Lcom/ninesky/browser/provider/downloads/l;->e()V

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->d:Lcom/ninesky/browser/provider/downloads/i;

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->e:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/provider/downloads/i;->a(Ljava/util/List;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    sget-object v1, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    new-array v2, v9, [Ljava/lang/String;

    const-string v3, "_id"

    aput-object v3, v2, v8

    const-string v3, "status >= \'200\'"

    const-string v5, "lastmod"

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    if-nez v0, :cond_5

    const-string v0, "DownloadManager"

    const-string v1, "null cursor in trimDatabase"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    :goto_0
    invoke-static {}, Landroid/os/Environment;->getDownloadCacheDirectory()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File;

    move-result-object v0

    if-eqz v0, :cond_4

    new-instance v7, Ljava/util/HashSet;

    invoke-direct {v7}, Ljava/util/HashSet;-><init>()V

    move v1, v8

    :goto_1
    array-length v2, v0

    if-lt v1, v2, :cond_8

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    sget-object v2, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    new-array v3, v9, [Ljava/lang/String;

    const-string v0, "_data"

    aput-object v0, v3, v8

    move-object v5, v4

    move-object v6, v4

    invoke-virtual/range {v1 .. v6}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    if-eqz v0, :cond_3

    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v1

    if-eqz v1, :cond_2

    :cond_1
    invoke-interface {v0, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v7, v1}, Ljava/util/HashSet;->remove(Ljava/lang/Object;)Z

    invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z

    move-result v1

    if-nez v1, :cond_1

    :cond_2
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    :cond_3
    invoke-virtual {v7}, Ljava/util/HashSet;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_2
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_a

    :cond_4
    invoke-direct {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a()V

    return-void

    :cond_5
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v1

    if-eqz v1, :cond_6

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v1

    const/16 v2, 0x3e8

    sub-int/2addr v1, v2

    const-string v2, "_id"

    invoke-interface {v0, v2}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v2

    :goto_3
    if-gtz v1, :cond_7

    :cond_6
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    goto :goto_0

    :cond_7
    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    sget-object v5, Lcom/ninesky/browser/provider/downloads/w;->a:Landroid/net/Uri;

    invoke-interface {v0, v2}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v6

    invoke-static {v5, v6, v7}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v3, v5, v4, v4}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    invoke-interface {v0}, Landroid/database/Cursor;->moveToNext()Z

    move-result v3

    if-eqz v3, :cond_6

    add-int/lit8 v1, v1, -0x1

    goto :goto_3

    :cond_8
    aget-object v2, v0, v1

    invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "lost+found"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_9

    aget-object v2, v0, v1

    invoke-virtual {v2}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "recovery"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_9

    aget-object v2, v0, v1

    invoke-virtual {v2}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v7, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    :cond_9
    add-int/lit8 v1, v1, 0x1

    goto/16 :goto_1

    :cond_a
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/io/File;->delete()Z

    goto :goto_2
.end method

.method public onDestroy()V
    .locals 2

    invoke-virtual {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/DownloadService;->c:Lcom/ninesky/browser/provider/downloads/f;

    invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V

    invoke-super {p0}, Landroid/app/Service;->onDestroy()V

    return-void
.end method

.method public onStart(Landroid/content/Intent;I)V
    .locals 0

    invoke-super {p0, p1, p2}, Landroid/app/Service;->onStart(Landroid/content/Intent;I)V

    invoke-direct {p0}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a()V

    return-void
.end method
